package com.tonypy.mqtt.mqttdemo.runner;


import com.tonypy.mqtt.mqttdemo.mqtt.MultipleMqtt;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @desc:
 * @author: XZL
 * @createTime: 2019/11/7 14:47
 * @version: v0.0.1
 * @history:
 */
@Component
@Slf4j
public class StartRunner implements CommandLineRunner {


    @Autowired
    private MultipleMqtt multipleMqtt;

    @Override
    public void run(String... args) throws Exception {
        log.info("--------开始连接mqtt服务--------");
        multipleMqtt.addAnAdapter("192.168.0.201");
    }

}
